package com.woniuxy.userassembly.dao;

import com.woniuxy.userassembly.model.RbacPermissionRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Liyfi
 * @since 2021-05-22
 */
public interface RbacPermissionRoleMapper extends BaseMapper<RbacPermissionRole> {
    @Insert("insert into rbac_permission_role (role_id,permission_id) value(#{roleId},#{permissionId})")
    int addPermissionRole(RbacPermissionRole permissionRole);

    @Select("select * from rbac_permission_role where id=#{permissionRoleId}")
    RbacPermissionRole selPermissionRole(int permissionRoleId);

    @Delete("delete rbac_permission_role where id =#{permissionRoleId}")
    int delPermissionRole(int permissionRoleId);

}
